package cn.itsource.ymcc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@SpringBootApplication
@EnableDiscoveryClient
@EnableScheduling
public class KillApp {
    public static void main(String[] args) {
        SpringApplication.run(KillApp.class);
    }
    //每天凌晨1点执行一次：0 0 23 * * ?
    //每天晚上，12点，发布秒杀课程到Redis
//    @Scheduled(cron = "0/5 * * * * ?")
//    public void publishKillCourse2Redis(){
//        System.out.println("定时发布课程");
//    }

}
